<template>
    <ion-page>
      <ion-header>
        <ion-toolbar>
          <ion-buttons slot="start">
            <ion-back-button fill="outline"></ion-back-button>
          </ion-buttons>
        </ion-toolbar>
    </ion-header>
        <ion-content>
            <ion-card >     
            <ion-card-content>                          
              {{ contentdata.data }}
            </ion-card-content>
        </ion-card>
        </ion-content>        
    </ion-page>
</template>
<script setup>
import { ref,onMounted } from 'vue';
import service1 from '@/api/request';
import { IonPage,IonCard,IonCardContent,IonToolbar,IonHeader,IonContent,IonBackButton,IonButtons } from '@ionic/vue';
import { useRoute } from 'vue-router';
const route = useRoute();
const contents=ref({content:{
  id:'',
  }
})
const contentdata =ref('')

const fetchData =async () => {
      try {        
      const response = await service1.get('/alertApi/getNcContent',{ params: {id:route.params.id}});
        contents.value = response.data;  
        contentdata.value = response.data;       
          console.log(response.data);
      } catch (error) {
        // 处理请求错误
        console.error('Error fetching data:',error);
      }
    }  
    onMounted(fetchData);
    
</script>